Import wiki - foreign key constraint error

Hi there,


I have an urgent problem with importing wikis in Mountain Lion (10.8.2 / OS X Server 2.1).


What I did: under Lion did a "wikiadmin export", migrated a Lion Server to ML / OS X Server (10.8.2 / 2.1) and did a "wikiadmin export" again. Then I did a complete new installation of the server, erasing the disk, an installing ML 10.8.2 from scratch (copied it to an USB thumb drive before). Installed OS X Server 2.1. on top of it.


Now, after activationg Wikis in Server app, created a test wiki (OK) and the tried to reimport the old Wikis (from the ML export). But non succeeded. Every time the error goes like this:


ep 26 21:10:28 server.foo.net wikiadmin[17249] <Debug>: [PGCConnection:181 75bb2180 +0ms] Query result is [PGRES_COMMAND_OK] rows returned=0/updated=3

Sep 26 21:10:28 server.foo.net wikiadmin[17249] <Debug>: [PGCConnection:233 75bb2180 +0ms] Executing query [INSERT INTO file_entity (entity_uid_fk, content_type, data_uid_fk) (SELECT entity_uid_fk, content_type, data_uid_fk FROM file_entity_scratch_20120924T174840)]

Sep 26 21:10:28 server.foo.net wikiadmin[17249] <Debug>: [PGCConnection:181 75bb2180 +0ms] Query result is [PGRES_FATAL_ERROR] rows returned=0/updated=

Sep 26 21:10:28 server.foo.net wikiadmin[17249] <Error>: [PGCConnection:148 75bb2180 +0ms] Error in TXN: Error executing query [INSERT INTO file_entity (entity_uid_fk, content_type, data_uid_fk) (SELECT entity_uid_fk, content_type, data_uid_fk FROM file_entity_scratch_20120924T174840)]: ERROR: insert or update on table "file_entity" violates foreign key constraint "file_entity_data_uid_fk_fkey"

DETAIL: Key (data_uid_fk)=(caceea67-37ca-4cac-a1d3-160e129cb7f7) is not present in table "filedata_entity".


(

0 CoreFoundation 0x00007fff86b520a6 __exceptionPreprocess + 198

1 libobjc.A.dylib 0x00007fff870ed3f0 objc_exception_throw + 43

2 PostgreSQLClient 0x00000001086fc9ae -[PGCConnection checkResultOK:forSQL:] + 360

3 PostgreSQLClient 0x00000001086fcec3 -[PGCConnection executeQuery:] + 223

4 wikiadmin 0x000000010869e576 wikiadmin + 66934

5 PostgreSQLClient 0x00000001086fc5f7 -[PGCConnection transactionInBlock:onError:] + 147

6 wikiadmin 0x000000010869dc86 wikiadmin + 64646

7 wikiadmin 0x00000001086ad6be wikiadmin + 128702

8 wikiadmin 0x0000000108693fa3 wikiadmin + 24483

9 libdyld.dylib 0x00007fff898e87e1 start + 0

10 ??? 0x0000000000000004 0x0 + 4

)

Sep 26 21:10:28 server.foo.net wikiadmin[17249] <Debug>: [PGCConnection:320 75bb2180 +0ms] Executing update [ROLLBACK]

Sep 26 21:10:28 server.foo.net wikiadmin[17249] <Debug>: [PGCConnection:181 75bb2180 +0ms] Query result is [PGRES_COMMAND_OK] rows returned=0/updated=

2012-09-26 21:10:28.413 wikiadmin[17249:707] *** Terminating app due to uncaught exception 'PGCQueryError', reason: 'Error executing query [INSERT INTO file_entity (entity_uid_fk, content_type, data_uid_fk) (SELECT entity_uid_fk, content_type, data_uid_fk FROM file_entity_scratch_20120924T174840)]: ERROR: insert or update on table "file_entity" violates foreign key constraint "file_entity_data_uid_fk_fkey"

DETAIL: Key (data_uid_fk)=(caceea67-37ca-4cac-a1d3-160e129cb7f7) is not present in table "filedata_entity".

'

*** First throw call stack:

(

0 CoreFoundation 0x00007fff86b520a6 __exceptionPreprocess + 198

1 libobjc.A.dylib 0x00007fff870ed3f0 objc_exception_throw + 43

2 PostgreSQLClient 0x00000001086fc9ae -[PGCConnection checkResultOK:forSQL:] + 360

3 PostgreSQLClient 0x00000001086fcec3 -[PGCConnection executeQuery:] + 223

4 wikiadmin 0x000000010869e576 wikiadmin + 66934

5 PostgreSQLClient 0x00000001086fc5f7 -[PGCConnection transactionInBlock:onError:] + 147

6 wikiadmin 0x000000010869dc86 wikiadmin + 64646

7 wikiadmin 0x00000001086ad6be wikiadmin + 128702

8 wikiadmin 0x0000000108693fa3 wikiadmin + 24483

9 libdyld.dylib 0x00007fff898e87e1 start + 0

10 ??? 0x0000000000000004 0x0 + 4

)

libc++abi.dylib: terminate called throwing an exception

Abort trap: 6



Please help!


Kind regards,

Carsten

OS X Server

Posted on Sep 26, 2012 12:24 PM

Reply
6 replies

Dec 2, 2012 2:16 PM in response to COWegner

Thanks for the quick reply COWegner.


Ouch. That sounds like a pretty bad reply from Apple.

I'm wondering how Apple expects any company to incorporate their server solution in any infrastructure, if it is not possible to migrate content to other servers, and have it better distributed.

Maintenance is key in any server solution, specially when companies are evaluating what mobile strategy to adopt.

This is one of those things they should get fixed ASAP.


Regards,

Sergio

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Import wiki - foreign key constraint error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.